// import Vue from 'vue'
import Router from 'vue-router'
// 
// import Register from '@/view/Register'
// 
// wx
// import WxLogin from '@/view/WX/login'
// import WxBindPhone from '@/view/WX/BindPhone'
// 
Vue.use(Router)

export default new Router({
    routes: [
        // {
        //     path: '/login',
        //     component: resolve => require(['@/view/Login.vue'], resolve)
        // },

        {
            path: '/auth',
            component: resolve => require(['@/components/HomePage.vue'], resolve),
            redirect: '/manage/user',
            children: [{
                path: '/manage/role',
                name: 'role-manage',
                component: resolve => require(['@/view/role/index.vue'], resolve)
            }, {
                path: '/manage/role/detail',
                name: 'role-detail',
                component: () => import('@/view/role/detail.vue')
            }, {
                path: '/manage/organization/position',
                name: 'organization-post-manage',
                component: resolve => require(['@/view/department/index.vue'], resolve)
            }, {
                path: '/manage/authority',
                name: 'authority-manage',
                component: resolve => require(['@/view/auth/manage/index.vue'], resolve)
            }, {
                path: '/create/authority',
                name: 'authority-create',
                component: resolve => require(['@/view/auth/create/index.vue'], resolve)
            }, {
                path: '/manage/user',
                name: 'personnel-manage',
                component: resolve => require(['@/view/personnel/index.vue'], resolve)
            }, {
                path: '/project/setting',
                component: resolve => require(['@/view/project/setting/index.vue'], resolve),
                meta: {
                    keepAlive: false
                }
            }, {
                path: '/project/baseinfo',
                component: resolve => require(['@/view/project/baseinfo/index.vue'], resolve)
            }, {
                path: '/empolder/documentation',
                component: resolve => require(['@/view/empolder/index.vue'], resolve)
            }, {
                path: '/group/manage',
                name: 'group-manage',
                component: resolve => require(['@/view/group/manage/index.vue'], resolve)
            }, {
                path: '/group/join',
                name: 'group-join',
                component: resolve => require(['@/view/group/join/index.vue'], resolve)
            }]
        }, {
            path: '/',
            component: resolve => require(['@/components/login_register.vue'], resolve),
            redirect: '/login',
            children: [{
                path: 'login',
                component: resolve => require(['@/view/login/index.vue'], resolve)
            }, {
                path: 'register',
                component: resolve => require(['@/view/register/index.vue'], resolve)
            }]
        }, {
            path: '/protocal',
            component: resolve => require(['@/view/register/protocal.vue'], resolve)
        }
    ]
})
